package com.study.design.decorator.example;

/**
 * 加蔬菜
 */
public class GreensDecorator extends PancakeDecorator{
    /**
     * 通过构造函数传递被修饰者
     *
     * @param pancake
     */
    public GreensDecorator(Pancake pancake) {
        super(pancake);
    }

    @Override
    public String getMsg() {
        return super.getMsg()+"加1份生菜";
    }

    @Override
    public Integer getPrice() {
        return super.getPrice()+1;
    }
}
